/*
 * @lc app=leetcode.cn id=3131 lang=golang
 *
 * [3131] 找出与数组相加的整数 I
 */
package Solutions

// @lc code=start
func addedInteger(nums1 []int, nums2 []int) int {
	sum := 0
	for _, v := range nums1 {
		sum += v
	}
	for _, v := range nums2 {
		sum -= v
	}
	return -sum / len(nums1)
}

// @lc code=end
